package com.segersten.othello.service.akka.lobby;

public class DomainPlayer {
    private String domain;
    private String nick;
    
    public DomainPlayer()
    {     
    }

    public DomainPlayer(String domain, String nick)
    {
        this.domain = domain;
        this.nick = nick;
    }
    
    public String getDomain()
    {
        return domain;
    }

    public void setDomain(String domain)
    {
        this.domain = domain;
    }

    public String getNick()
    {
        return nick;
    }

    public void setNick(String nick)
    {
        this.nick = nick;
    }

    @Override
    public int hashCode()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((domain == null) ? 0 : domain.hashCode());
        result = prime * result + ((nick == null) ? 0 : nick.hashCode());
        return result;
    }
    @Override
    public boolean equals(Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        DomainPlayer other = (DomainPlayer) obj;
        if (domain == null) {
            if (other.domain != null)
                return false;
        } else if (!domain.equals(other.domain))
            return false;
        if (nick == null) {
            if (other.nick != null)
                return false;
        } else if (!nick.equals(other.nick))
            return false;
        return true;
    }

    @Override
    public String toString()
    {
        return "DomainPlayer [domain=" + domain + ", nick=" + nick + "]";
    }
      
}
